//导入mysql模块
const mysql =require('mysql2')

//创建数据库连接对象
const db = mysql.createPool({
    host:'127.0.0.1',
    user:'root',
    password:'root',
    database:'yang',
    waitForConnections:true,
    connectionLimit:10,
    queueLimit:0
}).promise()

module.exports = db